export function debounce(func, delay) {
  let timeout;
  return function (e) {
    clearTimeout(timeout);
    const context = this
    const args = arguments
    timeout = setTimeout(function () {
      func.apply(context, args);
    }, delay)
  };
};